<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <input type="text" v-model="name" />
      {{ name }}

      <h2 v-for="(article,index) in news" :key="index">{{ article.title }}</h2>
    </div>
    <script>
      //数据最终更新前我们要能捕获到

      let hd = { name: "abc" };
      hd.name = "333";
      new Vue({
        el: "#app",
        data: {
          name: "yahoo",
          news: [{ title: "yahoo" }, { title: "tom" }],
        },
      });
      //let hd = document.createElement('h2')
      //[].forEach(v=>{
      //
      //})
      //hd.innerHTML = ``
    </script>
  </body>
</html>
